/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "curatorialelement")
@NamedQueries({
    @NamedQuery(name = "Curatorialelement.findAll", query = "SELECT c FROM Curatorialelement c"),
    @NamedQuery(name = "Curatorialelement.findByIdcuratorialelement", query = "SELECT c FROM Curatorialelement c WHERE c.idcuratorialelement = :idcuratorialelement"),
    @NamedQuery(name = "Curatorialelement.findByFieldnumber", query = "SELECT c FROM Curatorialelement c WHERE c.fieldnumber = :fieldnumber"),
    @NamedQuery(name = "Curatorialelement.findByFieldnote", query = "SELECT c FROM Curatorialelement c WHERE c.fieldnote = :fieldnote"),
    @NamedQuery(name = "Curatorialelement.findByVerbatimeventdate", query = "SELECT c FROM Curatorialelement c WHERE c.verbatimeventdate = :verbatimeventdate"),
    @NamedQuery(name = "Curatorialelement.findByVerbatimelevation", query = "SELECT c FROM Curatorialelement c WHERE c.verbatimelevation = :verbatimelevation"),
    @NamedQuery(name = "Curatorialelement.findByVerbatimdepth", query = "SELECT c FROM Curatorialelement c WHERE c.verbatimdepth = :verbatimdepth"),
    @NamedQuery(name = "Curatorialelement.findByIndividualcount", query = "SELECT c FROM Curatorialelement c WHERE c.individualcount = :individualcount"),
    @NamedQuery(name = "Curatorialelement.findByDateidentified", query = "SELECT c FROM Curatorialelement c WHERE c.dateidentified = :dateidentified")})
public class Curatorialelement implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idcuratorialelement")
    private Integer idcuratorialelement;
    @Column(name = "fieldnumber")
    private String fieldnumber;
    @Column(name = "fieldnote")
    private String fieldnote;
    @Column(name = "verbatimeventdate")
    private String verbatimeventdate;
    @Column(name = "verbatimelevation")
    private String verbatimelevation;
    @Column(name = "verbatimdepth")
    private String verbatimdepth;
    @Column(name = "individualcount")
    private Integer individualcount;
    @Column(name = "dateidentified")
    @Temporal(TemporalType.DATE)
    private Date dateidentified;
    @JoinTable(name = "curatorialpreparation", joinColumns = {
        @JoinColumn(name = "idcuratorialelement", referencedColumnName = "idcuratorialelement")}, inverseJoinColumns = {
        @JoinColumn(name = "idpreparation", referencedColumnName = "idpreparation")})
    @ManyToMany(fetch = FetchType.LAZY)
    private List<Preparation> preparationList;
    @JoinTable(name = "curatorialidentifiedby", joinColumns = {
        @JoinColumn(name = "idcuratorialelement", referencedColumnName = "idcuratorialelement")}, inverseJoinColumns = {
        @JoinColumn(name = "ididentifiedby", referencedColumnName = "ididentifiedby")})
    @ManyToMany(fetch = FetchType.LAZY)
    private List<Identifiedby> identifiedbyList;
    @JoinTable(name = "curatorialrecordedby", joinColumns = {
        @JoinColumn(name = "idcuratorialelement", referencedColumnName = "idcuratorialelement")}, inverseJoinColumns = {
        @JoinColumn(name = "idrecordedby", referencedColumnName = "idrecordedby")})
    @ManyToMany(fetch = FetchType.LAZY)
    private List<Recordedby> recordedbyList;
    @ManyToMany(mappedBy = "curatorialelementList", fetch = FetchType.LAZY)
    private List<Associatedsequence> associatedsequenceList;
    @JoinTable(name = "curatorialtypestatus", joinColumns = {
        @JoinColumn(name = "idcuratorialelement", referencedColumnName = "idcuratorialelement")}, inverseJoinColumns = {
        @JoinColumn(name = "idtypestatus", referencedColumnName = "idtypestatus")})
    @ManyToMany(fetch = FetchType.LAZY)
    private List<Typestatus> typestatusList;
    @OneToMany(mappedBy = "curatorialelement", fetch = FetchType.LAZY)
    private List<Specimen> specimenList;
    @JoinColumn(name = "iddisposition", referencedColumnName = "iddisposition")
    @ManyToOne(fetch = FetchType.LAZY)
    private Disposition disposition;

    public Curatorialelement() {
    }

    public Curatorialelement(Integer idcuratorialelement) {
        this.idcuratorialelement = idcuratorialelement;
    }

    public Integer getIdcuratorialelement() {
        return idcuratorialelement;
    }

    public void setIdcuratorialelement(Integer idcuratorialelement) {
        this.idcuratorialelement = idcuratorialelement;
    }

    public String getFieldnumber() {
        return fieldnumber;
    }

    public void setFieldnumber(String fieldnumber) {
        this.fieldnumber = fieldnumber;
    }

    public String getFieldnote() {
        return fieldnote;
    }

    public void setFieldnote(String fieldnote) {
        this.fieldnote = fieldnote;
    }

    public String getVerbatimeventdate() {
        return verbatimeventdate;
    }

    public void setVerbatimeventdate(String verbatimeventdate) {
        this.verbatimeventdate = verbatimeventdate;
    }

    public String getVerbatimelevation() {
        return verbatimelevation;
    }

    public void setVerbatimelevation(String verbatimelevation) {
        this.verbatimelevation = verbatimelevation;
    }

    public String getVerbatimdepth() {
        return verbatimdepth;
    }

    public void setVerbatimdepth(String verbatimdepth) {
        this.verbatimdepth = verbatimdepth;
    }

    public Integer getIndividualcount() {
        return individualcount;
    }

    public void setIndividualcount(Integer individualcount) {
        this.individualcount = individualcount;
    }

    public Date getDateidentified() {
        return dateidentified;
    }

    public void setDateidentified(Date dateidentified) {
        this.dateidentified = dateidentified;
    }

    public List<Preparation> getPreparationList() {
        return preparationList;
    }

    public void setPreparationList(List<Preparation> preparationList) {
        this.preparationList = preparationList;
    }

    public List<Identifiedby> getIdentifiedbyList() {
        return identifiedbyList;
    }

    public void setIdentifiedbyList(List<Identifiedby> identifiedbyList) {
        this.identifiedbyList = identifiedbyList;
    }

    public List<Recordedby> getRecordedbyList() {
        return recordedbyList;
    }

    public void setRecordedbyList(List<Recordedby> recordedbyList) {
        this.recordedbyList = recordedbyList;
    }

    public List<Associatedsequence> getAssociatedsequenceList() {
        return associatedsequenceList;
    }

    public void setAssociatedsequenceList(List<Associatedsequence> associatedsequenceList) {
        this.associatedsequenceList = associatedsequenceList;
    }

    public List<Typestatus> getTypestatusList() {
        return typestatusList;
    }

    public void setTypestatusList(List<Typestatus> typestatusList) {
        this.typestatusList = typestatusList;
    }

    public List<Specimen> getSpecimenList() {
        return specimenList;
    }

    public void setSpecimenList(List<Specimen> specimenList) {
        this.specimenList = specimenList;
    }

    public Disposition getDisposition() {
        return disposition;
    }

    public void setDisposition(Disposition disposition) {
        this.disposition = disposition;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idcuratorialelement != null ? idcuratorialelement.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Curatorialelement)) {
            return false;
        }
        Curatorialelement other = (Curatorialelement) object;
        if ((this.idcuratorialelement == null && other.idcuratorialelement != null) || (this.idcuratorialelement != null && !this.idcuratorialelement.equals(other.idcuratorialelement))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Curatorialelement[idcuratorialelement=" + idcuratorialelement + "]";
    }

}
